POV-Ray : Newsgroups : povray.newusers : Using arrays of vectors : Re: Using arrays of vectors Server Time
29 Jul 2024 14:14:48 EDT (-0400)
  Re: Using arrays of vectors  
From: Warp
Date: 27 Sep 2005 02:23:52
Message: <4338e578@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> sor{NbOfPoints,
> #local Index = 0;
> #while(Index < NbOfPoints - 1)
>         VectorOfPoints[Index],
> #local Index = Index + 1;
> #end
> VectorOfPoints[Index] // No comma for last point
> texture{Texture}
> }

  You don't need the commas at all. Besides, the number of points doesn't
need to be supplied explicitly.
  And by the way, be so kind to not to teach bad habits to beginners by
giving as example badly-indented code.

sor
{
    #local Amount = dimension_size(VectorOfPoints, 1);

    Amount

    #local Index = 0;
    #while(Index < Amount)
        VectorOfPoints[Index]
        #local Index = Index+1;
    #end

    texture { Texture }
}

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.